<?php
require ('./Express.class.php');
header('Content-Type:text/html; charset=utf-8');
$express = new Express();
$num = $_GET['num'];
$result  = $express -> getorder($num);
echo "快递单号:".$num."<br/><br/>";
if($result['message'] == 'ok'){
	echo '<table width="100%" border="0" cellspacing="0" class="kuaidi_info">
		  <tr>
		    <td width="20%" style=" background:#CCC; font-weight:600; padding-left:5px;">时间</td>
		    <td width="80%" style=" background:#CCC; font-weight:600; padding-left:5px;">快递详细</td>
		  </tr>';
	foreach ($result['data'] as $v) {
		echo "<tr>
			    <td style=' line-height:24px; padding-left:5px; font-size:14px; color:#333;'>".$v['time']."</td>
			    <td style=' line-height:24px; padding-left:5px; font-size:14px; color:#333;'>".$v['context']."</td>
			  </tr>";
	}
	echo '</table>';
}else{
	echo "<div style='margin-top:100px; text-align:center;'>该单号暂无物流进展，请稍后再试，或检查单号是否有误。</div>";
}
echo "<style>
.kuaidi_info{ border-top:1px solid #555; border-right:1px solid #555;}
.kuaidi_info tr td{ border-bottom:1px solid #555; border-left:1px solid #555;}
</style>";

